program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, n, k: integer;
begin
  k:=0;                        
  readln(a, b, c);
  readln(n);
  if (n mod a=0) then
    k:=k+1;
  if (n mod b=0) then
    k:=k+1;
  if (n mod c=0) then
    k:=k+1;
  if (k=2) then
  begin
    writeln('YES');
  end else begin
    writeln('NO');
  end;
  readln;
end.
 